let getData = require("./getData");

async function 返回牙叔教程(keyword) {
  let data = await getData();
  var len = data.length;
  keyword = keyword.trim();
  let arr = [];
  for (var i = 0; i < len; i++) {
    let item = data[i];
    if (item.title.indexOf(keyword) > -1) {
      let url = "https://www.yuque.com/yashujs/bfug6u";
      arr.push(item.title + "\n" + url + "/" + item.url);
    }
  }
  let result = arr.join("\n");

  return result;
}

module.exports = 返回牙叔教程;
